// c++
#include <iostream>
#include <string>
#include <vector>

#include <strsplit.hh>

/**
 * Simple driver function to demo the use of strsplit
 */
int main()
{
    const std::string foo("If the implementation is hard to explain, "
                          "it's a bad idea.");
    std::vector<std::string> tokens;
    Mage::strsplit(foo, tokens, ' ');
    for (auto it = tokens.cbegin(); it != tokens.cend(); ++it)
        std::cout << *it << std::endl;
}

// Output:
// 
// If
// the
// implementation
// is
// hard
// to
// explain,
// it's
// a
// bad
// idea.
